From: nana-4 Date: Sat, 25 Jan 2020 09:11:28 +0000 (+0900) Subject: theme: Simplify .search-section-content items styling X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~11 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fc4dfa11c397c85632ec1ff3783258121213033b;p=gnome-shell.git theme: Simplify .search-section-content items styling This reduces duplicate code in .search-provider-icon and .list-search-result by using %search-section-content-item to improve maintainability. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/957 --- diff --git a/data/theme/gnome-shell-sass/widgets/_search-results.scss b/data/theme/gnome-shell-sass/widgets/_search-results.scss index 1c53abfc2..b067f4776 100644 --- a/data/theme/gnome-shell-sass/widgets/_search-results.scss +++ b/data/theme/gnome-shell-sass/widgets/_search-results.scss @@ -34,6 +34,22 @@ spacing: 0; } +%search-section-content-item { + @extend %icon_tile; + + &:focus, + &:hover, + &:selected { + background-color: transparentize($osd_fg_color, .9); + transition-duration: 200ms; + } + + &:active, + &:checked { + background-color: transparentize(darken($osd_bg_color, 10%), .1); + } +} + // "no results" text .search-statustext { @extend %status_text; @@ -46,24 +62,9 @@ // search result provider .search-provider-icon { - @extend %icon_tile; - - padding: $base_padding; - spacing: 0; + @extend %search-section-content-item; margin-right: $base_margin * 2; - &:focus, - &:selected, - &:hover { - background-color: transparentize($osd_fg_color,.9); - transition-duration: 200ms; - } - - &:active, - &:checked { - background-color: transparentize(darken($osd_bg_color,10%),.1); - } - // content .list-search-provider-content { spacing: $base_spacing * 2; @@ -85,23 +86,7 @@ // search result listitem .list-search-result { - @extend %icon_tile; - spacing: 0; - padding: $base_padding; - color: $osd_fg_color; - - border-radius: $base_border_radius + 2px; - - &:focus, - &:selected, - &:hover { - background-color: transparentize($osd_fg_color,.9); - transition-duration: 200ms; - } - &:active, - &:checked { - background-color: transparentize(darken($osd_bg_color,10%),.1); - } + @extend %search-section-content-item; // content .list-search-result-content { @@ -110,7 +95,6 @@ // list item title .list-search-result-title { - color: $osd_fg_color; spacing: $base_spacing * 2; padding-right: $base_padding; // font-weight: bold;